package com.hzit.user.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Configuration
public class MyBatisPlusConfig {

	@Bean
	public MybatisPlusInterceptor pageInterceptor(){
		PaginationInnerInterceptor innerInterceptor = new PaginationInnerInterceptor();
		innerInterceptor.setDbType(DbType.MYSQL);
		MybatisPlusInterceptor pageInterceptor = new MybatisPlusInterceptor();
		pageInterceptor.addInnerInterceptor(innerInterceptor);
		return pageInterceptor;
	}
}
